package cn.destiny.infrastructure.persistent.dao;

import cn.destiny.infrastructure.persistent.po.Award;
import cn.destiny.infrastructure.persistent.po.StrategyAward;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 抽奖策略奖品明细配置-概率、规则 DAO
 */
@Mapper
public interface IStrategyAwardDao {

    List<StrategyAward> queryStrategyAwardList();

    List<StrategyAward> queryStrategyAwardListByStrategyId(Long strategyId);

    /**
     * 查询奖品规则模式
     * @param strategyAward 策略奖品对象
     */
    String queryStrategyAwardRuleModels(StrategyAward strategyAward);

    /**
     * 更新奖品库存消耗
     * @param strategyAward 策略奖品对象
     */
    void updateStrategyAwardStock(StrategyAward strategyAward);

    /**
     * 查询策略奖品
     * @param strategyAwardReq
     * @return
     */
    StrategyAward queryStrategyAward(StrategyAward strategyAwardReq);
}
